from PyQt5.QtWidgets import *       #部件，控件相关
from PyQt5.QtGui import *           #图片相关
from PyQt5.QtCore import *          #事件相关(鼠标等事件)

import sys    

from ui.Ui_son_widget import *                      

#自定义窗口，继承窗口
class son_Widget(QWidget):
    
    #定义信号
    signal_1 = pyqtSignal(int, str)
    signal_2 = pyqtSignal()
    
    
    def __init__(self, parent=None):
        super().__init__(parent)
        
        #创建子窗口对象
        self.ui = Ui_Form()
        #给子窗口函数
        self.ui.setupUi(self)
        
        self.init_ui()

    def init_ui(self):
        
        #按键按下函数
        self.ui.sM1_btn.clicked.connect(lambda:self.signal_1.emit(1, "jack"))
        self.ui.sM2_btn.clicked.connect(lambda:self.signal_2.emit())
